﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.IO;

namespace time
{
    class js语言
    {
        public static void main()
        {

            Console.Write(GetQQPass());
            Console.ReadLine();
        }

        private static string GetQQPass()
        {
           

            System.Type type = System.Type.GetTypeFromProgID("MSScriptControl.ScriptControl");
            Object script = System.Activator.CreateInstance(type);
            type.InvokeMember("language", BindingFlags.SetProperty, null, script, new Object[] { "JavaScript" });
            StreamReader sr1 = new StreamReader("1.js");
            string s = sr1.ReadToEnd();
            type.InvokeMember("AddCode", BindingFlags.InvokeMethod, null, script, new Object[] { s });
            string strtemp = type.InvokeMember("Run", BindingFlags.InvokeMethod, null, script, new Object[] { "a" }).ToString();

            return strtemp;
        }
    }
}
